<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php
require_once ('db.php');
include_once ('header.inc');

$header_msg = 'Write some shit!';

if (!(empty($_POST['entry']))) {
	$sql = 'INSERT INTO blogentries (id, user_id, created_date, title,
		entry) VALUES (?, ?, ?, ?, ?)';
	$sth = $eebsdb->prepare ($sql);
	if (!(empty($_POST['test_email']))) {
		$sth->execute(array ($_POST['test_username'],
		$_POST['test_email'], 1, $newsalt, $newpass, 0))
		or die(mysql_error());
	} else {
		echo "<P>email is empty</P>";
	}
} 
else {
	echo "<P>password is empty or does not match</P>";
}
	
?>
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<P>
	Success, your entry has been posted.
</P>
</body>
</html>
<?php
exit ();
}
?>
<!DOCTYPE html>
<!-- add a password comparison form and check
	pwd === pwdcmp -->
<html>
<head>
</head>
<body>
	<form method="post" action="logentry.php">
		<label for="title">Title: </label>
			<input type="text" name="title" title="title-really?"><br/>
		<label for="entry">Entry: </label>
			<input type="text" name="entry" title="entry-really?"><br/>
		<input type="submit" value="Submit entry"/>
	</form>
</body>
</html>